System and method for speculatively issuing memory requests while maintaining a specified packet order

ABSTRACT

The present invention is a system and method for forwarding packets in order. A first packet may be received for forwarding. Subsequently, a second packet may be received for forwarding. A first memory request corresponding to the first packet is sent. A second memory request corresponding to the second packet may be sent prior to receiving a first memory reply corresponding to the first memory request. The first packet is forwarded prior to forwarding the second packet. In this novel manner, bandwidth in a network apparatus may be utilized with greater efficiency while maintaining packet ordering.

TECHNICAL FIELD

[0001] Embodiments of the present invention relate to networking. More particularly, embodiments of the present invention relate to a system and method for speculatively issuing memory requests while maintaining a specified packet order.

BACKGROUND ART

[0002] The internet has revolutionized the movement of information for both commercial and personal business. Fantastic technical advances in the communications arts have fueled the tremendous growth of the internet and networking in general. The growth fueled by these advances has in turn become a catalyst for greater innovation.

[0003] One area receiving a great deal of attention is the routing, or switching of information among various networks, or different segments of a network. The devices which perform these operations are typically known as routers or switches.

[0004] A principal function of a router or a switch is to move information, usually in the form of packets, particularly Internet Protocol, or IP, packets, from one network, or segment of a network, to another. The different networks or segments may frequently be of different types of media, e.g., coaxial cable versus fiber optics, and may often be of differing data rates or capacity. Often, the different network segments go to different physical locations, for example, different parts of a building, or distinct geographical regions. Frequently, too, information destined for multiple networks or segments may be received from a single network or segment.

[0005] Consequently, sending data to the right network or segment, along with controlling the flow, e.g., not attempting to send more data to a network or segment that it can handle, are of critical importance in the function of a network router or switch.

[0006] Receiving packets into a queue, and sending them out when a receiving network or segment is capable of accommodating such packets is a well known method of controlling the flow.

[0007] In the prior art, it is well known to request an allocation or space in a receiving queue associated with a receiving network or segment. This request is commonly known as a memory or buffer request. When a buffer for a receiving network or segment is able to actually receive a packet, it typically sends a message to the sending function to indicate its readiness. This reply is known as a memory or buffer reply. In response to such a buffer reply, a sending function transfers a packet to a receiving function associated with an outbound network or segment of a network.

[0008]FIG. 1 illustrates a prior art sequence of processing a packet. Packets are received and temporarily stored in a queue 100. When a packet, for example packet 0 (110) reaches the head of queue 102, it is ready to be forwarded. After packet 0 (110) has been successfully forwarded, packet 1 (111 ) will move to the head of the queue, and so on.

[0009] The mechanism of queue 100 ensures that packets are forwarded in the order in which they are received. Many types of multi part messages, for example streaming audio, may be severely degraded if their original packet order is not maintained throughout transmission. Further, processing packets in order ensures the equitable allocation of fixed resources within a network device or among networks. For example, if a packet processing device forwarded a packet to any receiver that was ready, as opposed to forwarding packets in order, a high bandwidth receiver could effectively monopolize the resources of the forwarding packet processing device to the detriment of packets intended for other, slower receivers. Such packets could enter a detrimental state of suspension, even if the receiving network had available bandwidth. For these reasons and others, processing packets in order is considered a critical attribute for switches and routers.

[0010] Still referring to FIG. 1, when packet 0 (110) reaches the head of queue 102 position, a buffer request 0 (120) is generated and sent to a receiving buffer (not shown). The receiving buffer, in general, will be busy, for example receiving packets from other sources or sending packets out via an associated network interface. Consequently, there will typically be a period of latency 122 prior to the receiving buffer's readiness to receive a packet.

[0011] After period of latency 122, when it is ready, a receiving buffer will reply to buffer request 0 (120) with a buffer reply 0 (124) message, indicating that it is ready to receive packet 0 (110). Upon receiving buffer reply 0 (124), packet 0 (110) is sent to the receiving buffer.

[0012] After packet 0 (110) has been successfully sent to a receiving buffer, packet 1 (111) moves to the head of queue 100, and the process repeats. As shown in FIG. 1, buffer request 1 (130) is not sent until packet 0 (110) has completed being sent. There will typically be a latency period 132, which in general is a different amount of time that latency period 122, followed by a buffer reply 1 (134) and ultimately the sending of packet 1 (111), which is not shown.

[0013] Unfortunately, in the prior art, the sequence of sending a buffer request, waiting until a receiving buffer is ready, receiving a buffer reply, and sending the designated packet requires an undesirably long time to complete. A packet would not be sent until a corresponding buffer reply was received. A second cycle of sending a buffer request, receiving a buffer reply, and sending a designated packet would not be initiated until after a current request, reply and transfer cycle has successfully completed. This restriction has a desired effect of sending packets in proper order, but imposes a severe latency penalty. In the prior art, this latency period 122 is lost. The latency effectively reduces overall bandwidth within the router or switch, which in turn reduces the number of packets it may route or switch on external networks per unit time.

SUMMARY OF THE INVENTION

[0014] A method of speculatively issuing memory requests while maintaining a specified packet order is disclosed. A first packet is received for forwarding. Subsequently, a second packet is received for forwarding. A first memory request corresponding to the first packet is sent. A second memory request corresponding to the second packet is sent prior to receiving a first memory reply corresponding to the first memory request. The first packet is forwarded prior to forwarding said second packet.

BRIEF DESCRIPTION OF THE DRAWINGS

[0015]FIG. 1 shows a prior art sequence of processing a packet.

[0016]FIG. 2 shows a flow chart of a method of forwarding packet in order, according to an embodiment of the present invention.

[0017]FIG. 3 illustrates a flow chart for a method of advancing a resource request, according to an embodiment of the present invention.

[0018]FIG. 4 shows a block diagram of elements of an exemplary network switch upon which embodiments of the present invention may be practiced, according to an embodiment of the present invention.

[0019]FIG. 5 illustrates an exemplary communications flow through a switch, according to an embodiment of the present invention.

[0020]FIG. 6 illustrates a sequence of operations of processing a packet, according to an embodiment of the present invention.

BEST MODES FOR CARRYING OUT THE INVENTION

[0021] A system and method for speculatively issuing memory requests while maintaining a specified packet order are disclosed. A first packet is received for forwarding. Subsequently, a second packet is received for forwarding. A first buffer request corresponding to the first packet is sent. A second request corresponding to the second packet is sent prior to receiving a first reply corresponding to the first request. The first packet is forwarded prior to forwarding the second packet. In this novel manner, the inherent latency typically associated with a response/reply protocol can effectively be “masked” out. Thereby, the bandwidth in a network apparatus may be utilized with greater efficiency while maintaining packet ordering.

[0022] As a beneficial result, network routers or switches utilizing embodiments of the present invention have the enhanced ability to process greater numbers of packets in a given time, improving overall network throughput, as measured both in packets per second as well as in elapsed switching time per packet. Further, embodiments of the present invention may be practiced with little or no additional hardware cost over the prior art, consequently reducing the cost per packet of such networking devices.

[0023]FIG. 2 shows a flow chart of a method 10 of forwarding packets in order, according to an embodiment of the present invention. In step 20, a first and second packets are received in sequence. In step 25, a memory or buffer request corresponding to the first packet is sent. A memory or buffer request solicits an allocation or space in a receiving queue, associated with a receiving network or segment. In step 30, a memory or buffer request corresponding to the second packet is sent, for example to packet processor 340 of FIG. 4. This memory or buffer request is sent prior to receiving a memory or buffer reply corresponding to the memory or buffer request sent in step 25. In optional step 35, the process may wait until a memory or buffer reply corresponding to the first packet is received before continuing. If such a memory or buffer reply is received, processing continues at step 40.

[0024] In step 40, the first packet is forwarded prior to forwarding the second packet. A memory or buffer request for the second packet has already been sent (step 30). According to an embodiment of the present invention, a memory or buffer reply may be received prior to step 40. It is possible that a buffer reply corresponding to the second packet was received prior to a buffer reply corresponding to the first packet. However, packets are still forwarded in the order received.

[0025]FIG. 3 illustrates a flow chart for a method 50 of advancing a resource request, according to an embodiment of the present invention. In optional step 55, a packet may be received. In step 60, the received packet may be stored in an input queue in the order in which packets are received. In optional step 65, a buffer request corresponding to a packet at the head of the input queue may be sent. In step 70, a buffer request corresponding to the next packet in the queue may be sent. It is to be appreciated that at various times the next packet in the queue may or may not be the second packet in the queue. For example it may be the fifth packet in queue.

[0026] In optional step 75, the process checks for the receipt of a buffer reply corresponding to the packet at the head of the queue, for example from packet processor 340, which indicates that the receiving packet processor is ready to accept that particular packet. If the appropriate buffer reply has not been received, process flow transfers to step 70, and an additional buffer request, corresponding to the next packet in queue for which a buffer request has not been sent, is sent. If a buffer reply corresponding to the packet at the head of the queue has been received, process flow continues at optional step 80 and the packet is sent, for example, to packet processor 340.

[0027]FIG. 4 shows a block diagram of elements of an exemplary network switch 300 upon which embodiments of the present invention may be practiced. At a high level, network switch 300 comprises at least two packet processors, for example packet processors 320 and 340, and a switching fabric, e.g., switching fabric 330, which allows packet processors to communicate with each other. Switch 300 typically includes many more similar packet processors.

[0028] Packet processor 320 contains network interface 360, which provides a physical interface to a communications link 362. Communications link 362 is a network, or segment of a network, comprising, for example, FDDI, fiber optic token ring, T1, Bluetooth, 802.11, ethernet etc. Network 362 may be a portion of a LAN, MAN, WAN or other networking arrangement.

[0029] Packet processor 320 includes an associated memory 310 for storing many types of information, including packets received from, or to be transmitted on network 362. It is to be appreciated that memory 310 may be internal or external to packet processor 320. Packet processor 320 is shown as having an input queue 312 for storing packets received from network 362. It is to be appreciated that packet processor 320 may also be configured to transmit packets onto network 362.

[0030] Packet processor 320 may have a local connection 322 to connecting fabric 330. In this example, connecting fabric 330 is depicted as connecting packet processor 320, via local connection 322, with packet processor 340, via local connection 342. It is appreciated that switching fabric 330 may also interconnect with other packet processors. Packet processors, e.g. 320 and 340, will generally contain a CPU or micro controller to control their operation.

[0031] Packet processor 340 may have a function and implementation analogous to those described for packet processor 320, including memory 350 and communications interface 370. Packet processor 340 is shown as having an output queue 352 for storing packets to be sent out on network 372.

[0032] Communications link 372 may be a network comprising, for example, FDDI, fiber optic token ring, T1, Bluetooth, 802.11, ethernet etc. Communications link 362 may be a portion of a LAN, MAN, WAN or other networking arrangement. In general, communications link 372 will not be the same network segment as communications link 362. Typically, although it is not a requirement, communications link 362 and communications link 372 may be different types of networks operating at different speeds.

[0033] Packet processors 320 and 340 may both be receiving and sending packets at a high rate of speed. In addition, a more general configuration of switch 300 may have many packet processors, and in general may receive and send packets on many combinations of these many packet processors.

[0034] In order to more clearly describe embodiments of the present invention, one path through exemplary switch 300, that of information received from network 362 to be sent out on network 372, will be further described below. It is to be appreciated that packets may be received from any network and switched to any other network.

[0035]FIG. 5 illustrates an exemplary communications flow through switch 300, according to an embodiment of the present invention. Packet processor 320 receives multiple packets, for example packet 0 (364) and packet 1(366) from network 362 to be switched or routed to network 372 via packet processor 340. Interleaved with those packets however, there are typically other packets intended for other communication links.

[0036] Packet processor 320 receives packet 0 (364) and packet 1 (366) and places them into input queue 312 in the order received. The mechanism of queue 312 ensures that packets are forwarded in the order in which they are received. Many types of multi part messages, for example streaming audio, may be severely degraded if their original packet order is not maintained throughout transmission. Further, processing packets in order ensures the equitable allocation of fixed resources within a network device or among networks. For example, if a packet processing device forwarded a packet to any receiver that was ready, as opposed to forwarding packets in order, a high bandwidth receiver could effectively monopolize the resources of the packet processing device to the detriment of packets intended for other, slower receivers. Such packets could enter a detrimental state of suspension, even if the receiving network had available bandwidth. For these reasons and others, processing packets in order is considered a critical attribute for switches and routers.

[0037] When packet 0 (364) has reached the head of queue 312, packet processor 320 generates and sends a buffer request message 420 for packet 0 to packet processor 340. Packet processor 340 may not be able to immediately accept packet 0 (364). For example, it may be busy processing other packets, or output queue 352 may be full. Consequently, in general there will be a delay or latency before packet processor 340 is able to receive packet 0 (364).

[0038] According to an embodiment of the present invention, packet processor 320 may be able to take advantage of this period of latency and send a buffer request 430 for packet 1 (366). It is to be appreciated that packet processor 320 may contain additional packets for forwarding to packet processor 340 or other packet processors (not shown), and packet processor 320 may send buffer requests corresponding to these packets during a period of latency as well.

[0039] When packet processor 340 is ready to accept packet 0 (364), it will send a buffer reply message 440. Upon receipt of buffer reply message 440, packet processor 320 will send 450 packet 0 (364) to packet processor 340. Packet processor 340 will typically place packet 0 (364) into output queue 352 prior to sending it out on network 372.

[0040] In addition, buffer request and/or buffer reply messages may be sent in a batch mode, (e.g., several at a time).

[0041]FIG. 6 illustrates a sequence of processing a packet, according to an embodiment of the present invention. Packets are received and temporarily stored in a queue 100, for example input queue 312 of FIG. 4. When a packet, for example packet 0 (110) reaches the head of queue 102, it is ready to be forwarded. After packet 0 (110) has been successfully forwarded, packet 1 (111) will move to the head of the queue, and so on.

[0042] The mechanism of queue 100 ensures that packets are forwarded in the order in which they are received. Many types of multi part messages, for example streaming audio, may be severely degraded if their original packet order is not maintained throughout transmission. Further, processing packets in order ensures the equitable allocation of fixed resources within a network device or among networks. For example, if a packet processing device forwarded a packet to any receiver that was ready, as opposed to forwarding packets in order, a high bandwidth receiver could effectively monopolize the resources of the packet processing device to the detriment of packets intended for other, slower receivers. Such packets could enter a detrimental state of suspension, even if the receiving network had available bandwidth. For these reasons and others, processing packets in order is considered a critical attribute for switches and routers.

[0043] When packet 0 (110) reaches the head of queue 102 position, a buffer request 0 (120) is generated and sent to a receiving buffer (not shown). The receiving buffer will typical be busy receiving packets from other sources or sending packets out via an associated network interface. Consequently, there will typically be a period of latency 122 prior to the receiving buffer's readiness to receive a packet. An embodiment of the present invention is able to utilize period of latency 122 by sending buffer request 1 (130), corresponding to packet 1 (111).

[0044] When a receiving buffer is ready to receive packet 0 (110), it will reply to buffer request 0 (120) with a buffer reply 0 (124), indicating that it is ready to receive packet 0 (110). Upon receiving buffer reply 0 (124), packet 0 (110) is sent to the receiving buffer. After packet 0 (110) has been successfully sent to a receiving buffer, packet 1 (111) moves to the head of queue 100.

[0045] Much or all of a latency period for buffer request 1 (130) may have expired while buffer reply 0 (124) and packet 0 (110) were being sent. This is particularly the case if packet 1 (111) is destined for a different receiving buffer than packet 0 (110).

[0046] As shown in FIG. 6, a buffer reply 134 for packet 1 may be received soon after packet 0 (110) is sent. Thereafter, packet 1 (111) may be sent.

[0047] In contrast with the prior art sequence shown in FIG. 1, several additional tasks, including sending packet 1 (111) are accomplished in this embodiment of the present invention in the same amount of time, which is indicative of the bandwidth advantages of embodiments of the present invention. In this manner, the time spent waiting for a buffer reply and the time spent waiting for a packet to move to the head of a transfer order queue may be utilized more efficiently, resulting in improved throughput for a network apparatus. 

What is claimed is:
 1. A method of speculatively issuing memory requests while maintaining a specified packet order comprising: receiving a first packet and a second packet for forwarding, wherein said first packet is received prior to said second packet; sending a first memory request corresponding to said first packet; sending a second memory request corresponding to said second packet prior to receiving a first memory reply corresponding to said first memory request; and forwarding said first packet prior to forwarding said second packet.
 2. The method as described in claim 1 wherein said first packet and said second packet are maintained in a transfer order queue.
 3. The method as described in claim 2 wherein said second memory request is sent prior to said second packet moving to a head of said transfer order queue.
 4. The method as described in claim 1 wherein said first memory request is to request resource to forward said first packet.
 5. The method as described in claim 1 further comprising receiving a second memory reply prior to forwarding said first packet.
 6. The method as described in claim 1 further comprising receiving said first memory reply prior to forwarding said first packet.
 7. The method as described in claim 1 wherein said first packet comprises an internet protocol packet.
 8. A network method comprising: receiving a first packet and a second packet for forwarding; sending a first memory request corresponding to said first packet; and sending a second memory request corresponding to said second packet prior to forwarding said first packet.
 9. The method as described in claim 8 wherein said first packet and said second packet are maintained in a transfer order queue.
 10. The method as described in claim 9 wherein said second memory request is sent prior to said second packet moving to a head of said transfer order queue.
 11. The method as described in claim 8 wherein said first memory request is to request resource to forward said first packet.
 12. The method as described in claim 8 further comprising receiving a second memory reply prior to forwarding said first packet.
 13. The method as described in claim 8 wherein said first memory reply is received prior to forwarding said first packet.
 14. The method as described in claim 8 wherein said first packet comprises an internet protocol packet.
 15. A networking device comprising: a first packet processor comprising: an input interface having a port to accept incoming packets; an input memory coupled to said input interface for temporarily storing said packets in a queue arranged by a receiving order; a second packet processor comprising: an output interface having a port to send said packets out of said networking device; an output memory coupled to said output interface for temporarily storing said packets; a switching fabric coupled to said first packet processor and said second packet processor for conveying information between said first packet processor and said second packet processor; and said first packet processor also for sending a memory request corresponding to a packet which is not at a head of said queue to said second packet processor.
 16. The networking device as described in claim 15 wherein said first packet processor is also for receiving a memory reply message from said second packet processor corresponding to a memory request for a packet.
 17. The networking device as described in claim 16 wherein said first packet processor is also for sending said packet to said second packet processor if said packet is at the head of said queue.
 18. The networking device as described in claim 17 wherein said second packet processor is also for receiving said packet at said second packet processor.
 19. The networking device as described in claim 15 wherein said second packet processor is also for sending said packet out of said networking device.
 20. The networking device as described in claim 15 further comprising a plurality of packet processors in addition to said first and said second packet processors coupled to said switching fabric.
 21. The networking device as described in claim 15 wherein said memory request comprises a first portion to indicate that said packet is not at a head of said queue.
 22. The networking device as described in claim 15 wherein said packet is an internet protocol packet.
 23. A networking device comprising a means for sending a memory request corresponding to a second packet prior to sending a first packet, wherein said first packet is received prior to receiving said second packet.
 24. The networking device as described in claim 23 wherein said means for sending a memory request further comprises means for maintaining the transfer order of said first and said second packets.
 25. The networking device as described in claim 24 wherein said means for maintaining the transfer order of said first and said second packets comprises a transfer order queue.
 26. The networking device as described in claim 25 wherein said means for sending a memory request further comprise sending said memory request for said second packet prior to said second packet reaching a head of said transfer order queue.
 27. The networking device as described in claim 23 wherein said means for sending a memory request further comprises means to request resource to transfer said packet.
 28. The networking device as described in claim 23 wherein said means for sending a memory request further comprises means for accepting a memory reply prior to forwarding said packet.
 29. The networking device as described in claim 28 wherein said means for accepting a memory reply further comprises means to assign network resource to transfer said packet.
 30. The networking device as described in claim 23 wherein said packet is an internet protocol packet. 